<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>话题列表 - 社交平台</title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <style>
        :root {
            --primary: #2563eb;
            --primary-light: #eff6ff;
            --primary-dark: #1d4ed8;
            --secondary: #64748b;
            --dark: #1e293b;
            --light: #f8fafc;
            --border: #e2e8f0;
            --success: #10b981;
            --warning: #f59e0b;
            --danger: #ef4444;
            --card-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
            --card-shadow-hover: 0 10px 20px rgba(0, 0, 0, 0.1);
        }
        
        body {
            font-family: 'Inter', system-ui, -apple-system, sans-serif;
            background-color: #f5f7fa;
            color: var(--dark);
            line-height: 1.6;
            padding-top: 20px;
            padding-bottom: 40px;
        }
        
        .container {
            max-width: 1200px;
        }
        
        /* 导航栏样式 */
        .navbar {
            background-color: white;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
            padding: 0.75rem 0;
            margin-bottom: 2rem;
        }
        
        .logo {
            font-size: 1.5rem;
            font-weight: 700;
            color: var(--primary);
            text-decoration: none;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }
        
        /* 筛选区域样式 */
        .filters-container {
            background-color: white;
            border-radius: 8px;
            box-shadow: var(--card-shadow);
            padding: 1.5rem;
            margin-bottom: 2rem;
        }
        
        .filter-section {
            margin-bottom: 1.5rem;
        }
        
        .filter-section:last-child {
            margin-bottom: 0;
        }
        
        .filter-title {
            font-weight: 600;
            margin-bottom: 0.75rem;
            color: var(--dark);
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }
        
        .search-container {
            position: relative;
            max-width: 500px;
        }
        
        .search-input {
            width: 100%;
            padding: 0.75rem 1rem 0.75rem 2.5rem;
            border: 1px solid var(--border);
            border-radius: 6px;
            font-size: 1rem;
            transition: border-color 0.2s, box-shadow 0.2s;
        }
        
        .search-input:focus {
            outline: none;
            border-color: var(--primary);
            box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
        }
        
        .search-icon {
            position: absolute;
            left: 0.75rem;
            top: 50%;
            transform: translateY(-50%);
            color: var(--secondary);
        }
        
        /* 分类筛选样式 */
        .category-tags {
            display: flex;
            flex-wrap: wrap;
            gap: 0.75rem;
        }
        
        .category-tag {
            padding: 0.35rem 1rem;
            background-color: var(--light);
            border: 1px solid var(--border);
            border-radius: 20px;
            font-size: 0.9rem;
            cursor: pointer;
            transition: all 0.2s;
        }
        
        .category-tag:hover {
            background-color: var(--primary-light);
            border-color: var(--primary-light);
            color: var(--primary);
        }
        
        .category-tag.active {
            background-color: var(--primary);
            color: white;
            border-color: var(--primary);
        }
        
        /* 时间筛选样式 */
        .time-filter {
            display: flex;
            gap: 1rem;
        }
        
        .time-btn {
            padding: 0.4rem 1rem;
            background-color: var(--light);
            border: 1px solid var(--border);
            border-radius: 6px;
            font-size: 0.9rem;
            cursor: pointer;
            transition: all 0.2s;
        }
        
        .time-btn:hover {
            background-color: var(--primary-light);
            border-color: var(--primary-light);
            color: var(--primary);
        }
        
        .time-btn.active {
            background-color: var(--primary);
            color: white;
            border-color: var(--primary);
        }
        
        /* 排序和视图切换样式 */
        .sort-view-controls {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 1.5rem;
            padding-bottom: 1rem;
            border-bottom: 1px solid var(--border);
        }
        
        .sort-controls {
            display: flex;
            align-items: center;
            gap: 1rem;
        }
        
        .sort-label {
            font-weight: 500;
            color: var(--secondary);
        }
        
        .sort-select {
            padding: 0.4rem 0.75rem;
            border: 1px solid var(--border);
            border-radius: 6px;
            font-size: 0.9rem;
            background-color: white;
        }
        
        .view-controls {
            display: flex;
            gap: 0.5rem;
        }
        
        .view-btn {
            width: 36px;
            height: 36px;
            border-radius: 6px;
            border: 1px solid var(--border);
            background-color: white;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.2s;
        }
        
        .view-btn:hover {
            background-color: var(--primary-light);
            border-color: var(--primary-light);
            color: var(--primary);
        }
        
        .view-btn.active {
            background-color: var(--primary);
            color: white;
            border-color: var(--primary);
        }
        
        /* 话题卡片通用样式 */
        .topic-card {
            background-color: white;
            border-radius: 8px;
            box-shadow: var(--card-shadow);
            overflow: hidden;
            transition: transform 0.2s, box-shadow 0.2s;
        }
        
        .topic-card:hover {
            transform: translateY(-3px);
            box-shadow: var(--card-shadow-hover);
        }
        
        .topic-body {
            padding: 1.25rem;
        }
        
        .topic-footer {
            padding: 0.75rem 1.25rem;
            border-top: 1px solid var(--border);
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-size: 0.9rem;
            color: var(--secondary);
        }
        
        .topic-title {
            font-size: 1.25rem;
            font-weight: 600;
            margin-bottom: 0.5rem;
            line-height: 1.4;
            transition: color 0.2s;
        }
        
        .topic-title:hover {
            color: var(--primary);
        }
        
        .topic-content {
            color: var(--secondary);
            margin-bottom: 1rem;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }
        
        .topic-meta {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            font-size: 0.85rem;
            color: var(--secondary);
            margin-bottom: 0.75rem;
        }
        
        .topic-author {
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }
        
        .author-avatar {
            width: 32px;
            height: 32px;
            border-radius: 50%;
            object-fit: cover;
        }
        
        .author-name {
            font-weight: 500;
            color: var(--dark);
        }
        
        .topic-stats {
            display: flex;
            align-items: center;
            gap: 1.25rem;
        }
        
        .topic-stat {
            display: flex;
            align-items: center;
            gap: 0.35rem;
        }
        
        .topic-actions {
            display: flex;
            align-items: center;
            gap: 1rem;
        }
        
        .topic-action {
            display: flex;
            align-items: center;
            gap: 0.35rem;
            cursor: pointer;
            transition: color 0.2s;
        }
        
        .topic-action:hover {
            color: var(--primary);
        }
        
        .topic-action.liked {
            color: var(--primary);
        }
        
        .topic-action.saved {
            color: var(--primary);
        }
        
        /* 图片容器样式 */
        .topic-images {
            margin-bottom: 1rem;
            border-radius: 6px;
            overflow: hidden;
            position: relative;
        }
        
        .single-image {
            width: 100%;
            height: 180px;
            object-fit: cover;
            display: block;
        }
        
        .multi-image {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 4px;
        }
        
        .multi-image img {
            width: 100%;
            height: 90px;
            object-fit: cover;
        }
        
        .image-count-overlay {
            position: absolute;
            bottom: 4px;
            right: 4px;
            background-color: rgba(0, 0, 0, 0.6);
            color: white;
            font-size: 0.8rem;
            padding: 2px 6px;
            border-radius: 4px;
        }
        
        /* 列表布局样式 */
        .list-layout {
            display: flex;
            flex-direction: column;
            gap: 1.5rem;
        }
        
        .list-layout .topic-card {
            display: flex;
            flex-direction: row;
        }
        
        .list-layout .topic-images {
            width: 200px;
            flex-shrink: 0;
            margin-bottom: 0;
        }
        
        .list-layout .single-image {
            height: 100%;
        }
        
        .list-layout .multi-image img {
            height: 50%;
        }
        
        .list-layout .topic-content-container {
            flex-grow: 1;
            display: flex;
            flex-direction: column;
        }
        
        .list-layout .topic-body {
            flex-grow: 1;
            display: flex;
            flex-direction: column;
        }
        
        .list-layout .topic-footer {
            border-top: none;
        }
        
        /* 网格布局样式 */
        .grid-layout {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
            gap: 1.5rem;
        }
        
        .grid-layout .topic-images {
            height: 180px;
            overflow: hidden;
        }
        
        .grid-layout .single-image {
            height: 100%;
        }
        
        .grid-layout .multi-image img {
            height: 50%;
        }
        
        /* 紧凑布局样式 */
        .compact-layout {
            display: flex;
            flex-direction: column;
            gap: 1rem;
        }
        
        .compact-layout .topic-card {
            padding: 1rem;
            display: flex;
            align-items: center;
            gap: 1rem;
        }
        
        .compact-layout .topic-images {
            width: 80px;
            height: 80px;
            flex-shrink: 0;
            margin-bottom: 0;
        }
        
        .compact-layout .single-image {
            height: 100%;
        }
        
        .compact-layout .multi-image img {
            height: 50%;
        }
        
        .compact-layout .topic-content {
            display: none;
        }
        
        .compact-layout .topic-footer {
            display: none;
        }
        
        .compact-layout .topic-meta {
            margin-bottom: 0;
        }
        
        /* 分类标签 */
        .topic-category {
            display: inline-block;
            padding: 0.25rem 0.65rem;
            background-color: var(--primary-light);
            color: var(--primary);
            border-radius: 4px;
            font-size: 0.75rem;
            margin-right: 0.5rem;
        }
        
        /* 活跃用户推荐 */
        .active-users {
            background-color: white;
            border-radius: 8px;
            box-shadow: var(--card-shadow);
            padding: 1.5rem;
            margin-bottom: 2rem;
        }
        
        .user-item {
            display: flex;
            align-items: center;
            gap: 1rem;
            padding: 0.75rem 0;
            border-bottom: 1px solid var(--border);
        }
        
        .user-item:last-child {
            border-bottom: none;
        }
        
        .user-info {
            flex-grow: 1;
        }
        
        .user-name {
            font-weight: 500;
            margin-bottom: 0.25rem;
        }
        
        .user-topics {
            font-size: 0.85rem;
            color: var(--secondary);
        }
        
        .follow-btn {
            padding: 0.35rem 0.75rem;
            background-color: var(--primary);
            color: white;
            border: none;
            border-radius: 4px;
            font-size: 0.85rem;
            cursor: pointer;
            transition: background-color 0.2s;
        }
        
        .follow-btn:hover {
            background-color: var(--primary-dark);
        }
        
        .follow-btn.following {
            background-color: transparent;
            color: var(--secondary);
            border: 1px solid var(--border);
        }
        
        .follow-btn.following:hover {
            background-color: var(--light);
        }
        
        /* 分页样式 */
        .pagination-container {
            display: flex;
            justify-content: center;
            margin-top: 2.5rem;
        }
        
        .pagination {
            display: flex;
            gap: 0.5rem;
        }
        
        .page-btn {
            width: 36px;
            height: 36px;
            border-radius: 6px;
            border: 1px solid var(--border);
            background-color: white;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.2s;
        }
        
        .page-btn:hover {
            background-color: var(--primary-light);
            border-color: var(--primary-light);
            color: var(--primary);
        }
        
        .page-btn.active {
            background-color: var(--primary);
            color: white;
            border-color: var(--primary);
        }
        
        .page-btn.disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }
        
        .page-btn.disabled:hover {
            background-color: white;
            border-color: var(--border);
            color: var(--secondary);
        }
        
        /* 响应式调整 */
        @media (max-width: 992px) {
            .list-layout .topic-card {
                flex-direction: column;
            }
            
            .list-layout .topic-images {
                width: 100%;
                height: 180px;
            }
            
            .sidebar {
                margin-top: 2rem;
            }
        }
        
        @media (max-width: 768px) {
            .filter-section {
                margin-bottom: 1rem;
            }
            
            .time-filter {
                flex-wrap: wrap;
            }
            
            .sort-view-controls {
                flex-direction: column;
                align-items: flex-start;
                gap: 1rem;
            }
            
            .grid-layout {
                grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
            }
        }
        
        @media (max-width: 576px) {
            .category-tags {
                gap: 0.5rem;
            }
            
            .category-tag {
                padding: 0.25rem 0.75rem;
                font-size: 0.85rem;
            }
            
            .topic-stats {
                gap: 0.75rem;
                flex-wrap: wrap;
            }
            
            .grid-layout {
                grid-template-columns: 1fr;
            }
        }
    </style>
</head>
<body>
    <!-- 导航栏 -->
    <nav class="navbar">
        <div class="container">
            <a href="#" class="logo">
                <i class="fas fa-comments"></i>
                社交平台
            </a>
            
            <div class="d-flex align-items-center gap-4">
                <a href="#" class="text-secondary" title="首页">
                    <i class="fas fa-home"></i>
                </a>
                <a href="#" class="text-secondary" title="消息">
                    <i class="fas fa-bell"></i>
                </a>
                <a href="#" class="text-secondary" title="个人中心">
                    <img src="https://picsum.photos/100/100?random=1" alt="用户头像" class="author-avatar">
                </a>
            </div>
        </div>
    </nav>
    
    <div class="container">
        <div class="row">
            <!-- 主内容区 -->
            <div class="col-lg-8">
                <!-- 筛选区域 -->
                <div class="filters-container">
                    <!-- 搜索框 -->
                    <div class="filter-section">
                        <div class="search-container">
                            <i class="fas fa-search search-icon"></i>
                            <input type="text" class="search-input" placeholder="搜索话题、内容或用户...">
                        </div>
                    </div>
                    
                    <!-- 分类筛选 -->
                    <div class="filter-section">
                        <div class="filter-title">
                            <i class="fas fa-tags"></i> 话题分类
                        </div>
                        <div class="category-tags">
                            <div class="category-tag active">全部</div>
                            <div class="category-tag">科技</div>
                            <div class="category-tag">职场</div>
                            <div class="category-tag">财经</div>
                            <div class="category-tag">健康</div>
                            <div class="category-tag">旅行</div>
                            <div class="category-tag">美食</div>
                            <div class="category-tag">学习</div>
                            <div class="category-tag">摄影</div>
                            <div class="category-tag">更多</div>
                        </div>
                    </div>
                    
                    <!-- 时间筛选 -->
                    <div class="filter-section">
                        <div class="filter-title">
                            <i class="fas fa-clock"></i> 时间范围
                        </div>
                        <div class="time-filter">
                            <button class="time-btn active">全部时间</button>
                            <button class="time-btn">今天</button>
                            <button class="time-btn">本周</button>
                            <button class="time-btn">本月</button>
                            <button class="time-btn">今年</button>
                            <button class="time-btn">自定义</button>
                        </div>
                    </div>
                    
                    <!-- 其他筛选 -->
                    <div class="filter-section">
                        <div class="filter-title">
                            <i class="fas fa-filter"></i> 更多筛选
                        </div>
                        <div class="row">
                            <div class="col-md-4 mb-3">
                                <select class="form-select">
                                    <option>热门程度</option>
                                    <option>最多点赞</option>
                                    <option>最多评论</option>
                                    <option>最多浏览</option>
                                </select>
                            </div>
                            <div class="col-md-4 mb-3">
                                <select class="form-select">
                                    <option>内容类型</option>
                                    <option>仅图片</option>
                                    <option>仅文字</option>
                                    <option>有视频</option>
                                </select>
                            </div>
                            <div class="col-md-4 mb-3">
                                <select class="form-select">
                                    <option>作者类型</option>
                                    <option>仅关注</option>
                                    <option>认证用户</option>
                                    <option>官方账号</option>
                                </select>
                            </div>
                        </div>
                    </div>
                </div>
                
                <!-- 排序和视图切换 -->
                <div class="sort-view-controls">
                    <div class="sort-controls">
                        <span class="sort-label">排序方式：</span>
                        <select class="sort-select">
                            <option value="recommend">推荐</option>
                            <option value="latest">最新发布</option>
                            <option value="hot">热门程度</option>
                            <option value="commented">评论最多</option>
                        </select>
                    </div>
                    
                    <div class="view-controls">
                        <button class="view-btn active" id="list-view-btn" title="列表视图">
                            <i class="fas fa-list"></i>
                        </button>
                        <button class="view-btn" id="grid-view-btn" title="网格视图">
                            <i class="fas fa-th"></i>
                        </button>
                        <button class="view-btn" id="compact-view-btn" title="紧凑视图">
                            <i class="fas fa-align-justify"></i>
                        </button>
                    </div>
                </div>
                
                <!-- 话题列表区域 -->
                <div class="topics-container list-layout" id="topics-container">
                    <!-- 话题1 - 带多图 -->
                    <div class="topic-card">
                        <div class="topic-images">
                            <div class="multi-image">
                                <img src="https://picsum.photos/400/300?random=1" alt="科技展览现场照片1" class="img-fluid">
                                <img src="https://picsum.photos/400/300?random=2" alt="科技展览现场照片2" class="img-fluid">
                                <img src="https://picsum.photos/400/300?random=3" alt="科技展览现场照片3" class="img-fluid">
                                <img src="https://picsum.photos/400/300?random=4" alt="科技展览现场照片4" class="img-fluid">
                            </div>
                            <div class="image-count-overlay">+8</div>
                        </div>
                        
                        <div class="topic-content-container">
                            <div class="topic-body">
                                <div class="topic-meta">
                                    <span class="topic-category">科技</span>
                                    <div class="topic-author">
                                        <img src="https://picsum.photos/100/100?random=10" alt="张明" class="author-avatar">
                                        <span class="author-name">张明</span>
                                    </div>
                                    <span>· 2小时前</span>
                                </div>
                                
                                <h3 class="topic-title">2023年国际科技展见闻：AI与元宇宙成为绝对主角</h3>
                                
                                <div class="topic-content">
                                    刚刚结束的2023年国际科技展汇集了全球最前沿的技术创新，AI与元宇宙相关产品占据了展览的半壁江山。本文分享一些令人印象深刻的技术突破和行业趋势观察，包括生成式AI的最新应用、元宇宙硬件的突破性进展，以及这些技术将如何改变我们的生活和工作方式...
                                </div>
                                
                                <div class="topic-stats">
                                    <div class="topic-stat">
                                        <i class="far fa-eye"></i> 5.2k
                                    </div>
                                    <div class="topic-stat">
                                        <i class="far fa-comment"></i> 128
                                    </div>
                                    <div class="topic-stat">
                                        <i class="far fa-bookmark"></i> 356
                                    </div>
                                </div>
                            </div>
                            
                            <div class="topic-footer">
                                <div class="topic-actions">
                                    <div class="topic-action liked">
                                        <i class="fas fa-heart"></i> 1.2k
                                    </div>
                                    <div class="topic-action">
                                        <i class="far fa-comment"></i> 评论
                                    </div>
                                    <div class="topic-action saved">
                                        <i class="fas fa-bookmark"></i> 已收藏
                                    </div>
                                    <div class="topic-action">
                                        <i class="fas fa-share-alt"></i> 分享
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    
                    <!-- 话题2 - 带单图 -->
                    <div class="topic-card">
                        <div class="topic-images">
                            <img src="https://picsum.photos/600/300?random=10" alt="远程工作场景" class="single-image img-fluid">
                        </div>
                        
                        <div class="topic-content-container">
                            <div class="topic-body">
                                <div class="topic-meta">
                                    <span class="topic-category">职场</span>
                                    <div class="topic-author">
                                        <img src="https://picsum.photos/100/100?random=20" alt="李娜" class="author-avatar">
                                        <span class="author-name">李娜</span>
                                    </div>
                                    <span>· 昨天</span>
                                </div>
                                
                                <h3 class="topic-title">远程工作三年经验总结：如何保持高效和工作生活平衡</h3>
                                
                                <div class="topic-content">
                                    从疫情开始至今，我已经远程工作了三年时间。从最初的混乱到现在的有序高效，积累了一些经验想和大家分享。包括如何建立工作边界、保持团队协作效率、避免 burnout 以及提升居家工作体验的实用工具推荐...
                                </div>
                                
                                <div class="topic-stats">
                                    <div class="topic-stat">
                                        <i class="far fa-eye"></i> 3.8k
                                    </div>
                                    <div class="topic-stat">
                                        <i class="far fa-comment"></i> 94
                                    </div>
                                    <div class="topic-stat">
                                        <i class="far fa-bookmark"></i> 215
                                    </div>
                                </div>
                            </div>
                            
                            <div class="topic-footer">
                                <div class="topic-actions">
                                    <div class="topic-action">
                                        <i class="far fa-heart"></i> 876
                                    </div>
                                    <div class="topic-action">
                                        <i class="far fa-comment"></i> 评论
                                    </div>
                                    <div class="topic-action">
                                        <i class="far fa-bookmark"></i> 收藏
                                    </div>
                                    <div class="topic-action">
                                        <i class="fas fa-share-alt"></i> 分享
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    
                    <!-- 话题3 - 无图 -->
                    <div class="topic-card">
                        <div class="topic-content-container">
                            <div class="topic-body">
                                <div class="topic-meta">
                                    <span class="topic-category">财经</span>
                                    <div class="topic-author">
                                        <img src="https://picsum.photos/100/100?random=30" alt="王建国" class="author-avatar">
                                        <span class="author-name">王建国</span>
                                    </div>
                                    <span>· 3天前</span>
                                </div>
                                
                                <h3 class="topic-title">2023年副业收入指南：适合上班族的5种低风险增收方式</h3>
                                
                                <div class="topic-content">
                                    在经济不确定性增加的当下，拥有一份副业收入能带来更多安全感。本文分享5种适合上班族的低风险副业，不需要投入大量时间，也不需要专业技能，普通人也能轻松上手。包括内容创作、知识付费、电商分销等方向的具体操作方法和注意事项...
                                </div>
                                
                                <div class="topic-stats">
                                    <div class="topic-stat">
                                        <i class="far fa-eye"></i> 6.4k
                                    </div>
                                    <div class="topic-stat">
                                        <i class="far fa-comment"></i> 215
                                    </div>
                                    <div class="topic-stat">
                                        <i class="far fa-bookmark"></i> 423
                                    </div>
                                </div>
                            </div>
                            
                            <div class="topic-footer">
                                <div class="topic-actions">
                                    <div class="topic-action liked">
                                        <i class="fas fa-heart"></i> 1.5k
                                    </div>
                                    <div class="topic-action">
                                        <i class="far fa-comment"></i> 评论
                                    </div>
                                    <div class="topic-action">
                                        <i class="far fa-bookmark"></i> 收藏
                                    </div>
                                    <div class="topic-action">
                                        <i class="fas fa-share-alt"></i> 分享
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    
                    <!-- 话题4 - 带单图 -->
                    <div class="topic-card">
                        <div class="topic-images">
                            <img src="https://picsum.photos/600/300?random=40" alt="健康饮食" class="single-image img-fluid">
                        </div>
                        
                        <div class="topic-content-container">
                            <div class="topic-body">
                                <div class="topic-meta">
                                    <span class="topic-category">健康</span>
                                    <div class="topic-author">
                                        <img src="https://picsum.photos/100/100?random=41" alt="刘芳" class="author-avatar">
                                        <span class="author-name">刘芳</span>
                                    </div>
                                    <span>· 3小时前</span>
                                </div>
                                
                                <h3 class="topic-title">忙碌上班族的健康饮食方案：15分钟快手营养餐</h3>
                                
                                <div class="topic-content">
                                    分享几个适合上班族的健康快手餐做法，15分钟就能搞定，营养均衡又美味，再也不用依赖外卖了。这些食谱简单易做，不需要专业烹饪技巧，在家或办公室都能轻松准备...
                                </div>
                                
                                <div class="topic-stats">
                                    <div class="topic-stat">
                                        <i class="far fa-eye"></i> 782
                                    </div>
                                    <div class="topic-stat">
                                        <i class="far fa-comment"></i> 36
                                    </div>
                                    <div class="topic-stat">
                                        <i class="far fa-bookmark"></i> 124
                                    </div>
                                </div>
                            </div>
                            
                            <div class="topic-footer">
                                <div class="topic-actions">
                                    <div class="topic-action">
                                        <i class="far fa-heart"></i> 145
                                    </div>
                                    <div class="topic-action">
                                        <i class="far fa-comment"></i> 评论
                                    </div>
                                    <div class="topic-action">
                                        <i class="far fa-bookmark"></i> 收藏
                                    </div>
                                    <div class="topic-action">
                                        <i class="fas fa-share-alt"></i> 分享
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                
                <!-- 分页 -->
                <div class="pagination-container">
                    <div class="pagination">
                        <button class="page-btn disabled">
                            <i class="fas fa-chevron-left"></i>
                        </button>
                        <button class="page-btn active">1</button>
                        <button class="page-btn">2</button>
                        <button class="page-btn">3</button>
                        <button class="page-btn">4</button>
                        <button class="page-btn">5</button>
                        <button class="page-btn">
                            <i class="fas fa-chevron-right"></i>
                        </button>
                    </div>
                </div>
            </div>
            
            <!-- 侧边栏 -->
            <div class="col-lg-4 sidebar">
                <!-- 活跃用户 -->
                <div class="active-users">
                    <div class="filter-title mb-3">
                        <i class="fas fa-users"></i> 活跃用户
                    </div>
                    
                    <div class="user-item">
                        <img src="https://picsum.photos/100/100?random=101" alt="张明" class="author-avatar">
                        <div class="user-info">
                            <div class="user-name">张明</div>
                            <div class="user-topics">科技、AI、创业</div>
                        </div>
                        <button class="follow-btn following">已关注</button>
                    </div>
                    
                    <div class="user-item">
                        <img src="https://picsum.photos/100/100?random=102" alt="李娜" class="author-avatar">
                        <div class="user-info">
                            <div class="user-name">李娜</div>
                            <div class="user-topics">职场、远程工作、生活方式</div>
                        </div>
                        <button class="follow-btn">关注</button>
                    </div>
                    
                    <div class="user-item">
                        <img src="https://picsum.photos/100/100?random=103" alt="王建国" class="author-avatar">
                        <div class="user-info">
                            <div class="user-name">王建国</div>
                            <div class="user-topics">财经、投资、副业</div>
                        </div>
                        <button class="follow-btn">关注</button>
                    </div>
                    
                    <div class="user-item">
                        <img src="https://picsum.photos/100/100?random=104" alt="林小厨" class="author-avatar">
                        <div class="user-info">
                            <div class="user-name">林小厨</div>
                            <div class="user-topics">美食、烹饪、探店</div>
                        </div>
                        <button class="follow-btn following">已关注</button>
                    </div>
                </div>
                
                <!-- 热门标签 -->
                <div class="active-users">
                    <div class="filter-title mb-3">
                        <i class="fas fa-fire"></i> 热门标签
                    </div>
                    
                    <div class="category-tags">
                        <div class="category-tag">人工智能 (1.2k)</div>
                        <div class="category-tag">远程工作 (856)</div>
                        <div class="category-tag">旅行攻略 (742)</div>
                        <div class="category-tag">美食推荐 (635)</div>
                        <div class="category-tag">理财技巧 (589)</div>
                        <div class="category-tag">健康生活 (521)</div>
                        <div class="category-tag">摄影技巧 (478)</div>
                        <div class="category-tag">读书笔记 (423)</div>
                        <div class="category-tag">职场成长 (387)</div>
                        <div class="category-tag">电影推荐 (356)</div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
    <script>
        // 页面加载完成后执行
        document.addEventListener('DOMContentLoaded', function() {
            // 筛选功能
            const categoryTags = document.querySelectorAll('.category-tag');
            categoryTags.forEach(tag => {
                tag.addEventListener('click', function() {
                    // 移除所有同类标签的active类
                    categoryTags.forEach(t => t.classList.remove('active'));
                    // 给当前点击的标签添加active类
                    this.classList.add('active');
                    
                    // 显示筛选提示
                    showToast(`已筛选：${this.textContent}`);
                });
            });
            
            // 时间筛选
            const timeBtns = document.querySelectorAll('.time-btn');
            timeBtns.forEach(btn => {
                btn.addEventListener('click', function() {
                    // 移除所有时间按钮的active类
                    timeBtns.forEach(b => b.classList.remove('active'));
                    // 给当前点击的按钮添加active类
                    this.classList.add('active');
                    
                    // 显示筛选提示
                    showToast(`已筛选：${this.textContent}`);
                });
            });
            
            // 视图切换功能
            const listViewBtn = document.getElementById('list-view-btn');
            const gridViewBtn = document.getElementById('grid-view-btn');
            const compactViewBtn = document.getElementById('compact-view-btn');
            const topicsContainer = document.getElementById('topics-container');
            
            listViewBtn.addEventListener('click', function() {
                setActiveView(this);
                topicsContainer.className = 'topics-container list-layout';
                showToast('已切换到列表视图');
            });
            
            gridViewBtn.addEventListener('click', function() {
                setActiveView(this);
                topicsContainer.className = 'topics-container grid-layout';
                showToast('已切换到网格视图');
            });
            
            compactViewBtn.addEventListener('click', function() {
                setActiveView(this);
                topicsContainer.className = 'topics-container compact-layout';
                showToast('已切换到紧凑视图');
            });
            
            // 设置当前激活的视图按钮
            function setActiveView(btn) {
                document.querySelectorAll('.view-btn').forEach(b => {
                    b.classList.remove('active');
                });
                btn.classList.add('active');
            }
            
            // 分页功能
            const pageBtns = document.querySelectorAll('.page-btn:not(.disabled)');
            pageBtns.forEach(btn => {
                btn.addEventListener('click', function() {
                    if (!this.classList.contains('page-btn')) return;
                    
                    // 移除所有页码按钮的active类
                    pageBtns.forEach(b => b.classList.remove('active'));
                    // 给当前点击的按钮添加active类
                    this.classList.add('active');
                    
                    // 显示分页提示
                    if (this.textContent.trim()) {
                        showToast(`已切换到第${this.textContent}页`);
                    } else if (this.querySelector('.fa-chevron-right')) {
                        showToast('已切换到下一页');
                    } else if (this.querySelector('.fa-chevron-left')) {
                        showToast('已切换到上一页');
                    }
                });
            });
            
            // 关注功能
            const followBtns = document.querySelectorAll('.follow-btn');
            followBtns.forEach(btn => {
                btn.addEventListener('click', function() {
                    if (this.classList.contains('following')) {
                        // 取消关注
                        this.classList.remove('following');
                        this.textContent = '关注';
                        showToast('已取消关注');
                    } else {
                        // 关注
                        this.classList.add('following');
                        this.textContent = '已关注';
                        showToast('关注成功');
                    }
                });
            });
            
            // 点赞功能
            const likeButtons = document.querySelectorAll('.topic-action:has(.far.fa-heart), .topic-action:has(.fas.fa-heart)');
            likeButtons.forEach(btn => {
                btn.addEventListener('click', function() {
                    const icon = this.querySelector('i');
                    const countText = this.childNodes[2].textContent.trim();
                    let count = parseInt(countText);
                    
                    if (icon.classList.contains('far')) {
                        // 点赞
                        icon.classList.remove('far');
                        icon.classList.add('fas');
                        this.classList.add('liked');
                        this.innerHTML = `<i class="fas fa-heart"></i> ${count + 1}`;
                        showToast('点赞成功');
                    } else {
                        // 取消点赞
                        icon.classList.remove('fas');
                        icon.classList.add('far');
                        this.classList.remove('liked');
                        this.innerHTML = `<i class="far fa-heart"></i> ${count - 1}`;
                        showToast('已取消点赞');
                    }
                });
            });
            
            // 收藏功能
            const saveButtons = document.querySelectorAll('.topic-action:has(.far.fa-bookmark), .topic-action:has(.fas.fa-bookmark)');
            saveButtons.forEach(btn => {
                btn.addEventListener('click', function() {
                    const icon = this.querySelector('i');
                    
                    if (icon.classList.contains('far')) {
                        // 收藏
                        icon.classList.remove('far');
                        icon.classList.add('fas');
                        this.classList.add('saved');
                        this.innerHTML = `<i class="fas fa-bookmark"></i> 已收藏`;
                        showToast('收藏成功');
                    } else {
                        // 取消收藏
                        icon.classList.remove('fas');
                        icon.classList.add('far');
                        this.classList.remove('saved');
                        this.innerHTML = `<i class="far fa-bookmark"></i> 收藏`;
                        showToast('已取消收藏');
                    }
                });
            });
            
            // 评论和分享功能
            const commentButtons = document.querySelectorAll('.topic-action:has(.far.fa-comment)');
            commentButtons.forEach(btn => {
                btn.addEventListener('click', function() {
                    const topicTitle = this.closest('.topic-card').querySelector('.topic-title').textContent;
                    showToast(`打开"${topicTitle}"的评论区`);
                });
            });
            
            const shareButtons = document.querySelectorAll('.topic-action:has(.fas.fa-share-alt)');
            shareButtons.forEach(btn => {
                btn.addEventListener('click', function() {
                    const topicTitle = this.closest('.topic-card').querySelector('.topic-title').textContent;
                    showToast(`分享"${topicTitle}"到社交媒体`);
                });
            });
            
            // 搜索功能
            const searchInput = document.querySelector('.search-input');
            searchInput.addEventListener('keypress', function(e) {
                if (e.key === 'Enter' && this.value.trim()) {
                    showToast(`搜索：${this.value}`);
                }
            });
            
           
        });
    </script>
</body>
</html>
    
